#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define i128 __int128
#define mem(x) memset(x,0,sizeof(x))
#define endl "\n"
#define printYes cout << "Yes\n"
#define printYES cout << "YES\n"
#define printNo cout << "No\n"
#define printNO cout << "NO\n"
#define lowbit(x) ((x)&(-(x)))
#define pb push_back
#define mkp make_pair
#define pii pair<int,int>
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define rep(i,j,k) for (int i=(j);i<=(k);i++)
#define per(i,j,k) for (int i=(j);i>=(k);i--)
#define pcnt(x) __builtin_popcount(x)
mt19937 rnd(time(0));
template<class T>void chkmin(T&x,T y){x=min(x,y);}
template<class T>void chkmax(T&x,T y){x=max(x,y);}

const ll inf=1000000000000000000; 
//const ll inf=1000000000;
//const ll mod=998244353;
//const ll mod=1000000007;

const int N=1000005,M=35;
int n,m; 
char a[M][M],s[N];
void init()
{
	m=30;
	rep(i,1,m) rep(j,1,m)
	{
		if (i%3==1||j%3==1) a[i][j]='R';
		else if (((i+1)/3+(j%3)/2)&1) a[i][j]='B';
		else a[i][j]='G';
	}
	cout << m << " " << m << endl;
	rep(i,1,m)
	{
		rep(j,1,m) cout << a[i][j];
		cout << endl;
	}
}
inline int dis(int x,int y)
{
	return (x-15)*(x-15)+(y-15)*(y-15);
}
const int det[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
const char d[4]={'D','U','R','L'};
string ans;
void dfs(int x,int y,int k)
{
	if (k==n-1) 
	{
		cout << ans;
		exit(0);
	}
	vector<pair<int,pair<pii,char>>>tmp;
	rep(i,0,3)
	{
		int X=x+det[i][0],Y=y+det[i][1];
		if (X<1||Y<1|X>m||Y>m) continue;
		if (a[X][Y]!=s[k+1]) continue;
		tmp.pb(mkp(dis(X,Y),mkp(mkp(X,Y),i)));
	}
	sort(tmp.begin(),tmp.end());
	for (auto i:tmp)
	{
		ans+=d[i.se.se];
		dfs(i.se.fi.fi,i.se.fi.se,k+1);
		ans.pop_back();
	}
}

int main()
{
	freopen("snake.in","r",stdin);
	freopen("snake.out","w",stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	init();
	cin >> s;
	n=strlen(s);
	int sx=1,sy=1;
	rep(i,1,m) rep(j,1,m) if (a[i][j]==s[0]&&dis(i,j)<=dis(sx,sy)) sx=i,sy=j;
	cout << sx << " " << sy << endl;
	dfs(sx,sy,0);
	return 0;
}
